#!/bin/bash

scripts/setupGitHooks
rm -rf tmp
mkdir tmp
cp -r ./*.ts tmp
cd tmp
find . -name '*.test.ts' | xargs rm -r
mv mod.ts index.ts
find . -name '*.ts' | xargs sed -i.bak 's/.ts";/";/g'
cp ../npm/tsconfig.json .
ln -s ../npm/node_modules node_modules
npx typedoc ./* --json docs.json
cp ../scripts/docs.js .
node docs.js
cd ..
rm -r tmp
